The phrase "to do the trick" means to perform a task or accomplish something successfully. It can also refer to performing an action, such as magic tricks, that deceives someone into believing in something that is not true.